// ObjectPaternityMap.h: interface for the ObjectPaternityMap class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_OBJECTPATERNITYMAP_H__0FEEEBEE_81D8_4385_87B0_9B7EACBDAD1B__INCLUDED_)
#define AFX_OBJECTPATERNITYMAP_H__0FEEEBEE_81D8_4385_87B0_9B7EACBDAD1B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "MultiRecordsDatabaseElement.h"

namespace PDMS
{
	namespace PDMSDBIF
	{
		class ObjectPaternityMapRecord
		{
		public:
			void SetID( long lID ) {
				m_lID = lID;
			}

			long GetID() const {
				return m_lID;
			}
			
			void SetParentID( long lID ) {
				m_lParentID = lID;
			}

			long GetParentID() const {
				return m_lParentID;
			}
		private:
			long m_lID;
			long m_lParentID;
		};
		
		typedef DatabaseTableTemplate< ObjectPaternityMapRecord > ObjectPaternityMapBase;
		class DllExport ObjectPaternityMap : public ObjectPaternityMapBase 
		{
			DECLARE_REGISTER_MAP( ObjectPaternityMap );
		public:
			ObjectPaternityMap();
			virtual ~ObjectPaternityMap();
			
		public:
			long GetID() const;
			long GetParentID() const;
			void SetID( long lID ) {
				m_pCurRecord->SetID( lID );
			}
			
			void SetParentID( long lID ) {
				m_pCurRecord->SetParentID( lID );
			}
			
		protected:
			virtual StdString GetOpenSQL( const StdString& strCondition );
			virtual StdString GetTableName();
			virtual void SetData( RecordPtr_ ptr );
		};
	}
}

#endif // !defined(AFX_OBJECTPATERNITYMAP_H__0FEEEBEE_81D8_4385_87B0_9B7EACBDAD1B__INCLUDED_)
